package com.i2works.smartluolong.manageapi.controller.common;

import com.alibaba.fastjson.JSONObject;
import com.i2works.smartluolong.utils.basecommon.BaseUploadController;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * 上传
 *
 * @author Liu Yutao
 * @className UploadUtil
 * @email koal@vip.qq.com
 * @date 2016/2/12 22:47
 */

@RestController
@Scope(value = "prototype")
@RequestMapping(value = "/common/uploader")
public class UploadController  extends BaseUploadController {


    /**
     * 上传
     *
     * @param files     文件
     * @param filesType 文件类型（0头像图片，1详情附件）
     */
    @PostMapping("/index")
    @Override
    public JSONObject index(
            @RequestParam(value = "files", required = false) MultipartFile[] files,
            @RequestParam(value = "filesType", required = false) Integer filesType
    ) {
        return super.index(files, filesType);
    }

}
